const parseMsgMW = require('express').Router()

parseMsgMW.route('/wx')
    .post(async (req, res, next) => {
        //console.log(req.query)
        //消息预处理
        const xmlMsg = await require('../tools/getUserMessage')(req)
        const jsonData = await require('../tools/paresMsg')(xmlMsg)
        //信息放入req中继续传递
        req.jsonData = jsonData
        next()
    })



module.exports = parseMsgMW